import request from '@/utils/request'

// 查询投票记录列表
export function listVotingRecords(query) {
  return request({
    url: '/pms/record/list',
    method: 'get',
    params: query
  })
}

// 获取投票详情
export function getVoteDetail(query) {
  return request({
    url: '/pms/vote/getVoteDetail',
    method: 'post',
    params: query
  })
}

// 新增投票记录
export function addVotingRecords(data) {
  return request({
    url: '/pms/record/add',
    method: 'post',
    data: data
  })
}

// 审核投票记录
export function auditVotingRecord(data) {
  return request({
    url: '/pms/record/edit',
    method: 'put',
    data: data
  })
}

// 删除投票记录
export function deleteVotingRecords(id) {
  return request({
    url: `/pms/record/${id.toString()}`,
    method: 'delete'
  })
}

export function listHouse(query) {
  return request({
    url: '/pms/house/getHouseByVote',
    method: 'get',
    params: query
  })
}

